package com.ruoyi.gcgl.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gcgl.mapper.GysptWarehouseEntryMapper;
import com.ruoyi.gcgl.domain.GysptWarehouseEntry;
import com.ruoyi.gcgl.service.IGysptWarehouseEntryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 入库单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-01
 */
@Service
public class GysptWarehouseEntryServiceImpl implements IGysptWarehouseEntryService 
{
    @Autowired
    private GysptWarehouseEntryMapper gysptWarehouseEntryMapper;

    /**
     * 查询入库单
     * 
     * @param id 入库单主键
     * @return 入库单
     */
    @Override
    public GysptWarehouseEntry selectGysptWarehouseEntryById(Long id)
    {
        return gysptWarehouseEntryMapper.selectGysptWarehouseEntryById(id);
    }

    /**
     * 查询入库单列表
     * 
     * @param gysptWarehouseEntry 入库单
     * @return 入库单
     */
    @Override
    public List<GysptWarehouseEntry> selectGysptWarehouseEntryList(GysptWarehouseEntry gysptWarehouseEntry)
    {
        return gysptWarehouseEntryMapper.selectGysptWarehouseEntryList(gysptWarehouseEntry);
    }

    /**
     * 新增入库单
     * 
     * @param gysptWarehouseEntry 入库单
     * @return 结果
     */
    @Override
    public int insertGysptWarehouseEntry(GysptWarehouseEntry gysptWarehouseEntry)
    {
        return gysptWarehouseEntryMapper.insertGysptWarehouseEntry(gysptWarehouseEntry);
    }

    /**
     * 修改入库单
     * 
     * @param gysptWarehouseEntry 入库单
     * @return 结果
     */
    @Override
    public int updateGysptWarehouseEntry(GysptWarehouseEntry gysptWarehouseEntry)
    {
        return gysptWarehouseEntryMapper.updateGysptWarehouseEntry(gysptWarehouseEntry);
    }

    /**
     * 批量删除入库单
     * 
     * @param ids 需要删除的入库单主键
     * @return 结果
     */
    @Override
    public int deleteGysptWarehouseEntryByIds(String ids)
    {
        return gysptWarehouseEntryMapper.deleteGysptWarehouseEntryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除入库单信息
     * 
     * @param id 入库单主键
     * @return 结果
     */
    @Override
    public int deleteGysptWarehouseEntryById(Long id)
    {
        return gysptWarehouseEntryMapper.deleteGysptWarehouseEntryById(id);
    }
}
